xen/hypfs: move per-node function pointers into a dedicated struct
authorJuergen Gross <jgross@suse.com>
Fri, 4 Dec 2020 07:29:41 +0000 (08:29 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Dec 2020 07:29:41 +0000 (08:29 +0100)
commitd29033719b8246d7bbef9b0fff2b6a168b7d1b56
tree791654851c4f83d46f1d400249392f6e41d38895
parentba6e78f0db820fbeea4df41fde4655020ca05928
xen/hypfs: move per-node function pointers into a dedicated struct

Move the function pointers currently stored in each hypfs node into a
dedicated structure in order to save some space for each node. This
will save even more space with additional callbacks added in future.

Provide some standard function vectors.

Instead of testing the write pointer to be not NULL provide a dummy
function just returning -EACCESS. ASSERT() all vector entries being
populated when adding a node. This avoids any potential problem (e.g.
pv domain privilege escalations) in case of calling a non populated
vector entry.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/hypfs.c
xen/include/xen/hypfs.h
xen/include/xen/param.h